package cn.jx.asc.user.mapper;

import cn.jx.asc.user.pojo.Plan;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface PlanMapper {
    int deleteByPrimaryKey(Integer planId);

    int insert(Plan record);

    int insertSelective(Plan record);

    Plan selectByPrimaryKey(Integer planId);

    int updateByPrimaryKeySelective(Plan record);

    int updateByPrimaryKey(Plan record);

    /**
     * @author LaiWeiXing
     * @date 2018/6/22 14:52
     * @describe 查找该用户id下的专家方案
    */
    List<Plan> findPlanListByUserId(Integer userId);

    /**
     * @author LaiWeiXing
     * @date 2018/6/26 21:07
     * @describe 根据用户id和作物种类查找专家方案
    */
    Plan findPlanByUserIdAndCropType(@Param(value = "userId") Integer userId, @Param(value = "cropType") String cropType);
}